3.262 \(\int (c+d x) \sin (a+b x) \tan ^2(a+b x) \, dx\)

Optimal. Leaf size=56 \[ -\frac{d \sin (a+b x)}{b^2}-\frac{d \tanh ^{-1}(\sin (a+b x))}{b^2}+\frac{(c+d x) \cos (a+b x)}{b}+\frac{(c+d x) \sec (a+b x)}{b} \]

[Out]

-((d*ArcTanh[Sin[a + b*x]])/b^2) + ((c + d*x)*Cos[a + b*x])/b + ((c + d*x)*Sec[a + b*x])/b - (d*Sin[a + b*x])/
b^2

________________________________________________________________________________________

Rubi [A]  time = 0.0537627, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4407, 3296, 2637, 4409, 3770} \[ -\frac{d \sin (a+b x)}{b^2}-\frac{d \tanh ^{-1}(\sin (a+b x))}{b^2}+\frac{(c+d x) \cos (a+b x)}{b}+\frac{(c+d x) \sec (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Sin[a + b*x]*Tan[a + b*x]^2,x]

[Out]

-((d*ArcTanh[Sin[a + b*x]])/b^2) + ((c + d*x)*Cos[a + b*x])/b + ((c + d*x)*Sec[a + b*x])/b - (d*Sin[a + b*x])/
b^2

Rule 4407

Int[((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> -Int[
(c + d*x)^m*Sin[a + b*x]^n*Tan[a + b*x]^(p - 2), x] + Int[(c + d*x)^m*Sin[a + b*x]^(n - 2)*Tan[a + b*x]^p, x]
/; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4409

Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Simp[
((c + d*x)^m*Sec[a + b*x]^n)/(b*n), x] - Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; Fre
eQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d x) \sin (a+b x) \tan ^2(a+b x) \, dx &=-\int (c+d x) \sin (a+b x) \, dx+\int (c+d x) \sec (a+b x) \tan (a+b x) \, dx\\ &=\frac{(c+d x) \cos (a+b x)}{b}+\frac{(c+d x) \sec (a+b x)}{b}-\frac{d \int \cos (a+b x) \, dx}{b}-\frac{d \int \sec (a+b x) \, dx}{b}\\ &=-\frac{d \tanh ^{-1}(\sin (a+b x))}{b^2}+\frac{(c+d x) \cos (a+b x)}{b}+\frac{(c+d x) \sec (a+b x)}{b}-\frac{d \sin (a+b x)}{b^2}\\ \end{align*}

Mathematica [A]  time = 0.316159, size = 107, normalized size = 1.91 \[ \frac{\sec (a+b x) \left (b (c+d x) \cos (2 (a+b x))-d \sin (2 (a+b x))+2 d \cos (a+b x) \left (\log \left (\cos \left (\frac{1}{2} (a+b x)\right )-\sin \left (\frac{1}{2} (a+b x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (a+b x)\right )+\cos \left (\frac{1}{2} (a+b x)\right )\right )\right )+3 b c+3 b d x\right )}{2 b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Sin[a + b*x]*Tan[a + b*x]^2,x]

[Out]

(Sec[a + b*x]*(3*b*c + 3*b*d*x + b*(c + d*x)*Cos[2*(a + b*x)] + 2*d*Cos[a + b*x]*(Log[Cos[(a + b*x)/2] - Sin[(
a + b*x)/2]] - Log[Cos[(a + b*x)/2] + Sin[(a + b*x)/2]]) - d*Sin[2*(a + b*x)]))/(2*b^2)

________________________________________________________________________________________

Maple [C]  time = 0.129, size = 123, normalized size = 2.2 \begin{align*}{\frac{ \left ( dxb+bc+id \right ){{\rm e}^{i \left ( bx+a \right ) }}}{2\,{b}^{2}}}+{\frac{ \left ( dxb+bc-id \right ){{\rm e}^{-i \left ( bx+a \right ) }}}{2\,{b}^{2}}}+2\,{\frac{{{\rm e}^{i \left ( bx+a \right ) }} \left ( dx+c \right ) }{b \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) }}-{\frac{d\ln \left ({{\rm e}^{i \left ( bx+a \right ) }}+i \right ) }{{b}^{2}}}+{\frac{d\ln \left ({{\rm e}^{i \left ( bx+a \right ) }}-i \right ) }{{b}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*sin(b*x+a)*tan(b*x+a)^2,x)

[Out]

1/2*(d*x*b+b*c+I*d)/b^2*exp(I*(b*x+a))+1/2*(d*x*b+b*c-I*d)/b^2*exp(-I*(b*x+a))+2*exp(I*(b*x+a))*(d*x+c)/b/(exp
(2*I*(b*x+a))+1)-d/b^2*ln(exp(I*(b*x+a))+I)+d/b^2*ln(exp(I*(b*x+a))-I)

________________________________________________________________________________________

Maxima [B]  time = 1.76264, size = 2866, normalized size = 51.18 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a)*tan(b*x+a)^2,x, algorithm="maxima")

[Out]

1/2*(2*c*(1/cos(b*x + a) + cos(b*x + a)) - 2*a*d*(1/cos(b*x + a) + cos(b*x + a))/b + ((b*x + (b*x + a)*cos(2*b
*x + 2*a) + a + sin(2*b*x + 2*a))*cos(3*b*x + 3*a)^3 + 6*(b*x + a)*cos(b*x + a)^3 + ((b*x + a)*sin(2*b*x + 2*a
) - cos(2*b*x + 2*a) - 1)*sin(3*b*x + 3*a)^3 + 6*(b*x + a)*cos(b*x + a)*sin(b*x + a)^2 + 2*(4*(b*x + a)*cos(2*
b*x + 2*a)*cos(b*x + a) + 4*(b*x + a)*cos(b*x + a) + (3*(b*x + a)*sin(b*x + a) + cos(b*x + a))*sin(2*b*x + 2*a
))*cos(3*b*x + 3*a)^2 + ((b*x + a)*cos(b*x + a) - sin(b*x + a))*cos(2*b*x + 2*a)^2 + (8*(b*x + a)*sin(2*b*x +
2*a)*sin(b*x + a) + (b*x + (b*x + a)*cos(2*b*x + 2*a) + a + sin(2*b*x + 2*a))*cos(3*b*x + 3*a) + 2*(3*(b*x + a
)*cos(b*x + a) - sin(b*x + a))*cos(2*b*x + 2*a) + 6*(b*x + a)*cos(b*x + a) - 2*sin(b*x + a))*sin(3*b*x + 3*a)^
2 + ((b*x + a)*cos(b*x + a) - sin(b*x + a))*sin(2*b*x + 2*a)^2 + ((b*x + a)*cos(2*b*x + 2*a)^2 + 13*(b*x + a)*
cos(b*x + a)^2 + (b*x + a)*sin(2*b*x + 2*a)^2 + (b*x + a)*sin(b*x + a)^2 + b*x + (13*(b*x + a)*cos(b*x + a)^2
+ (b*x + a)*sin(b*x + a)^2 + 2*b*x + 2*a)*cos(2*b*x + 2*a) + (12*(b*x + a)*cos(b*x + a)*sin(b*x + a) + cos(b*x
 + a)^2 + sin(b*x + a)^2)*sin(2*b*x + 2*a) + a)*cos(3*b*x + 3*a) + 2*(3*(b*x + a)*cos(b*x + a)^3 + 3*(b*x + a)
*cos(b*x + a)*sin(b*x + a)^2 + (b*x + a)*cos(b*x + a) - sin(b*x + a))*cos(2*b*x + 2*a) + (b*x + a)*cos(b*x + a
) - ((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*cos(3*b*x + 3*a)^2 + (cos(b*x + a)^2 +
 sin(b*x + a)^2)*cos(2*b*x + 2*a)^2 + (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*sin(3
*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*sin(2*b*x + 2*a)^2 + 2*(cos(2*b*x + 2*a)^2*cos(b*x + a) + co
s(b*x + a)*sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a)*cos(b*x + a) + cos(b*x + a))*cos(3*b*x + 3*a) + 2*(cos(b*x
+ a)^2 + sin(b*x + a)^2)*cos(2*b*x + 2*a) + cos(b*x + a)^2 + 2*(cos(2*b*x + 2*a)^2*sin(b*x + a) + sin(2*b*x +
2*a)^2*sin(b*x + a) + 2*cos(2*b*x + 2*a)*sin(b*x + a) + sin(b*x + a))*sin(3*b*x + 3*a) + sin(b*x + a)^2)*log(c
os(b*x + a)^2 + sin(b*x + a)^2 + 2*sin(b*x + a) + 1) + ((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x
 + 2*a) + 1)*cos(3*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*cos(2*b*x + 2*a)^2 + (cos(2*b*x + 2*a)^2 +
 sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*sin(3*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*sin(2*b*x
 + 2*a)^2 + 2*(cos(2*b*x + 2*a)^2*cos(b*x + a) + cos(b*x + a)*sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a)*cos(b*x
+ a) + cos(b*x + a))*cos(3*b*x + 3*a) + 2*(cos(b*x + a)^2 + sin(b*x + a)^2)*cos(2*b*x + 2*a) + cos(b*x + a)^2
+ 2*(cos(2*b*x + 2*a)^2*sin(b*x + a) + sin(2*b*x + 2*a)^2*sin(b*x + a) + 2*cos(2*b*x + 2*a)*sin(b*x + a) + sin
(b*x + a))*sin(3*b*x + 3*a) + sin(b*x + a)^2)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*sin(b*x + a) + 1) + (((b
*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a) - 1)*cos(3*b*x + 3*a)^2 + 12*(b*x + a)*cos(b*x + a)*sin(b*x + a) +
 2*(((b*x + a)*sin(b*x + a) - cos(b*x + a))*cos(2*b*x + 2*a) + ((b*x + a)*cos(b*x + a) + sin(b*x + a))*sin(2*b
*x + 2*a) + (b*x + a)*sin(b*x + a) - cos(b*x + a))*cos(3*b*x + 3*a) + (12*(b*x + a)*cos(b*x + a)*sin(b*x + a)
- cos(b*x + a)^2 - sin(b*x + a)^2 - 2)*cos(2*b*x + 2*a) - cos(2*b*x + 2*a)^2 - cos(b*x + a)^2 + ((b*x + a)*cos
(b*x + a)^2 + 13*(b*x + a)*sin(b*x + a)^2)*sin(2*b*x + 2*a) - sin(2*b*x + 2*a)^2 - sin(b*x + a)^2 - 1)*sin(3*b
*x + 3*a) + 6*((b*x + a)*cos(b*x + a)^2*sin(b*x + a) + (b*x + a)*sin(b*x + a)^3)*sin(2*b*x + 2*a) - sin(b*x +
a))*d/(((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*cos(3*b*x + 3*a)^2 + (cos(b*x + a)^
2 + sin(b*x + a)^2)*cos(2*b*x + 2*a)^2 + (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*si
n(3*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*sin(2*b*x + 2*a)^2 + 2*(cos(2*b*x + 2*a)^2*cos(b*x + a) +
 cos(b*x + a)*sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a)*cos(b*x + a) + cos(b*x + a))*cos(3*b*x + 3*a) + 2*(cos(b
*x + a)^2 + sin(b*x + a)^2)*cos(2*b*x + 2*a) + cos(b*x + a)^2 + 2*(cos(2*b*x + 2*a)^2*sin(b*x + a) + sin(2*b*x
 + 2*a)^2*sin(b*x + a) + 2*cos(2*b*x + 2*a)*sin(b*x + a) + sin(b*x + a))*sin(3*b*x + 3*a) + sin(b*x + a)^2)*b)
)/b

________________________________________________________________________________________

Fricas [A]  time = 0.511821, size = 251, normalized size = 4.48 \begin{align*} \frac{2 \, b d x + 2 \,{\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} - d \cos \left (b x + a\right ) \log \left (\sin \left (b x + a\right ) + 1\right ) + d \cos \left (b x + a\right ) \log \left (-\sin \left (b x + a\right ) + 1\right ) - 2 \, d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, b c}{2 \, b^{2} \cos \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a)*tan(b*x+a)^2,x, algorithm="fricas")

[Out]

1/2*(2*b*d*x + 2*(b*d*x + b*c)*cos(b*x + a)^2 - d*cos(b*x + a)*log(sin(b*x + a) + 1) + d*cos(b*x + a)*log(-sin
(b*x + a) + 1) - 2*d*cos(b*x + a)*sin(b*x + a) + 2*b*c)/(b^2*cos(b*x + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right ) \sin{\left (a + b x \right )} \tan ^{2}{\left (a + b x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a)*tan(b*x+a)**2,x)

[Out]

Integral((c + d*x)*sin(a + b*x)*tan(a + b*x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 2.52883, size = 3729, normalized size = 66.59 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a)*tan(b*x+a)^2,x, algorithm="giac")

[Out]

1/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